<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/tld/authority.tld" prefix="authority" %>
<%@ taglib uri="/tld/navigator.tld" prefix="navigator" %>
<%@ taglib uri="/tld/pagination.tld" prefix="page" %>

<navigator:navigator url="config/query.htm"/>

<div class="contentpanel">

    <div class="panel panel-default panel-bottom-no">
        <div class="row">
            <form>
                <input type="hidden" name="start" value="${query.start}">
                <input type="hidden" name="length" value="${query.length}">

                <div class="panel-body panel-body2 border-gray-b ">

                    <div class="col-md-7" style="margin-left: 26px">
                        <div class="form-group input-group">
                            <div class="select-container select select-container50 input-group-btn col-dm-3">
                                <a class="select-choice select-choice2">
                                    <span>全局变量名</span>
                                </a>
                            </div>
                            <input class="form-control form-control2" type="text" placeholder="请输入全局变量名" name="k" value="${query.k}" />
                        </div>
                    </div>

                    <div class="col-md-7" style="margin-left: 26px">
                        <div class="form-group input-group">
                            <div class="select-container select select-container50 input-group-btn col-dm-3">
                                <a class="select-choice select-choice2">
                                    <span>全局变量描述</span>
                                </a>
                            </div>
                            <input class="form-control form-control2" type="text" placeholder="请输入全局变量描述" name="memo" value="${query.memo}" />
                        </div>
                    </div>

                    <div class="btn-group2 left">
                        <button type="submit" class="btn btn-primary btn-4-query"><i class="icon icon-chaxun"></i>查询</button>
                    </div>

                </div>
            </form>
        </div>
    </div>

    <div class="panel panel-default">

        <div class="row">
            <div class="panel-body panel-body2  plr20">

                <div class="left">
                    <div class="btn-group left btn-group-none2">
                        <authority:authority url="/config/add">
                            <button class="btn btn-primary btn-4-add"><i class="icon icon-tianjia"></i>新增</button>
                        </authority:authority>
                    </div>
                </div>
            </div>
        </div>

        <%--Table--%>
        <div class="row">
            <div class=" plr20">
                <div class="table-responsive">
                    <table class="table dataTable">
                        <tbody>
                        <tr>
                            <th style="width: 100px;">序号</th>
                            <th><strong>全局变量名</strong></th>
                            <th><strong>全局变量内容</strong></th>
                            <th><strong>描述</strong></th>
                            <th><strong>是否禁用</strong></th>
                            <th style="width: 160px;"><strong>操作</strong></th>
                        </tr>
                        <c:forEach items="${paging.items}" var="item" varStatus="status">
                            <tr>
                                <td>${(paging.pageIndex - 1) * paging.pageSize + (status.index + 1)}</td>
                                <td>${item.k}</td>
                                <td>${item.v}</td>
                                <td>${item.memo}</td>
                                <td>${item.disabled?"是":"否"}</td>
                                <td>
                                    <authority:authority url="/config/modify">
                                        <a class="btn-4-modify" data-k="${item.k}">修改</a>
                                    </authority:authority>
                                    <%--<authority:authority url="/config/isLock">--%>
                                        <%--<a class="btn-4-isLock" data-k="${item.k}">--%>
                                        <%--${item.disabled?"<font color='green'>解锁</font>":"<font color='red'>锁定</font>"}</a>--%>
                                    <%--</authority:authority>--%>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <page:page pageIndex="${paging.pageIndex}" pageSize="${paging.pageSize}" count="${paging.count}"/>
            </div>
        </div>
    </div>
    <script src="js/dictionary/config-List.js" charset="UTF-8"></script>
</div>